Repository navigation
stm32: do not declare ADC interrupts unless using SIMPLEFOC_STM32_ADC_INTERRUPT - #546
Moddingear wants to merge 2 commits into
Conversation
|
Looks good. I usually use DMA for the ADC results, but have used interrupts as well, and had to hunt down that function in the library code and disable it. Better to control it with a #define so you don't have to modify the library code. |
bb0b10a to
141a1ed
Compare
|
Hey @Moddingear , This will not work in oour case. When the timer does not have interrupt counter we use interrupt callback to downsample the readings. The proposed PR woudl break the readings on timers without repetition counter. So we might add a new flag somewhere called And condition the ADC handlers on this maybe. If this flag is not defined then the interrupts are not allowed and you can condition the adc handler definitions on this. |
141a1ed to
f3d64ae
Compare
|
Modified as requested. |
This allows the user to declare their own ADC interrupts when they're not in use by SimpleFOC (which they're not by default)